﻿
using Irony.Compiler;

namespace IronLua.Ast {

	public class CommentStatement : Statement {

		readonly string comment;

		public string Comment {
			get { return comment; }
		}

		public override LuaNodeType NodeType {
			get { return LuaNodeType.CommentStatement; }
		}

		public CommentStatement (CompilerContext context, NonTerminal nonTerminal, SourceLocation location, AstNodeList childNodes)
			: base (context, nonTerminal, location, childNodes)
		{
			comment = (ChildNodes [0] as Token).Text.Substring (2);
		}

		public override void Accept (ILuaAstVisitor visitor)
		{
			visitor.VisitCommentStatement (this);
		}
	}
}
